public class AccountPaginationController{
	
	public AccountPaginationController(ApexPages.StandardController acon) {
	}
	
	public AccountPaginationController(ApexPages.StandardSetController acon) {
		this();
	}

    public ApexPages.StandardSetController setController {get; private set;}
    public Integer empSize {get; set;}
    
    public AccountPaginationController(){
        queryForRecords();    
    }
    public PageReference filterRecords(){
        queryForRecords();
        return null;
    }    
    public List<Account> getRecords(){
        return setController.getRecords();
    }
    private void queryForRecords(){
        String soqlToExecute ='select Id,Name,BillingStreet,BillingState,BillingCountry,BillingPostalCode,NumberOfEmployees from Account';  
        if(empSize !=null){
            soqlToExecute +=' where NumberOfEmployees >=:empSize';
        }
        setController = new ApexPages.StandardSetController(Database.getQueryLocator(soqlToExecute));
        setController.setPageSize(3);
    
    }
    
    public void next()  
    {  
       setController.save();
       setController.next();  
    } 
    
    

}